package vpag;

public class Variable02 {

    public static void main(String[] args)
    {
        printVariable();

    }

    //打印全部数据类型
    public static void printVariable()
    {
        byte b = 127;
        short s = 32767;
        int i = 2147483647;
        //注意：long类型需要添加后缀L，否则会被识别为整型（默认）
        long l = 9223372036854775807L;
        //注意：浮点数类型需要添加后缀f或d，否则会被识别为double（默认）
        float f = 3.4028235E38f;
        double d = 1.7976931348623157E308d;
        char c = 'a';
        boolean bool = true;

        // 字符串类型 S大写
        String str = "hello world";

        System.out.println("byte类型b = " + b);
        System.out.println("short类型s = " + s);
        System.out.println("int类型i = " + i);
        System.out.println("long类型l = " + l);
        System.out.println("float类型f = " + f);
        System.out.println("double类型d = " + d);
        System.out.println("char类型c = " + c);
        System.out.println("boolean类型bool = " + bool);
        System.out.println("String类型str = " + str);


    }

}
